<!--
	作者：956911785@qq.com
	时间：2018-10-14
	描述：修改删除查看
-->
<template>
	<div>
		<div style="width:100%;" >		
			<Icon type="md-eye" size="20" title="查看兑换记录" style="cursor: pointer;margin-right:5px;color:#42B983;" @click="look()"/>
			<Icon type="ios-create-outline" size="20" title="修改" style="cursor: pointer; margin-right:5px;color:#2d8cf0;" @click="edit()"/>
			<template v-if="spstate==0">
				<Icon type="md-arrow-round-down" size="20" title="商品下架" style="cursor: pointer;margin-right:5px;color:#ed4014;" @click="updatestate(1)"/>
			</template>
			<template v-if="spstate==1">
				<Icon type="md-arrow-up" size="20" title="商品上架" style="cursor: pointer;margin-right:5px;color:#ed4014;" @click="updatestate(0)"/>
			</template>	
		</div>
	</div>
</template>
<script>
	
    export default {
    	name: "EditDelLook",
    	props: {
    		spstate:{
    			type: String
    		},
    	},
        data () {
            return {
            	
            }
        },
        computed: {
        	
		},
		methods: {
			look:function(){
           		this.$emit("look");
           	},	
           	edit: function(){
           		this.$emit("edit");
           	},
           	updatestate:function(spstate){
           		this.$emit("updatestate",spstate);
           	}
	    },
		mounted(){
			
		},
		watch:{
			
		}
    }
</script>


<style >
	
	.toolstipdiv{
		width: '100%';
		overflow: 'hidden';
		textOverflow: 'ellipsis';
		whiteSpace: 'normal';
		wordBreak: 'break-all';
		color:'#fff';
		text-align: center;
	}
	.toolstipdiv:hover{
		background:rgb(63, 193, 201);
	}
	
</style>



